﻿<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<ul id="tree" class="tree">
    <% For Each item In ViewData("SiteUserGroups")%>
    <li id="slRow_<%: item.ID%>"><span>
        <input type="image" id="btnSiteNode_<%: item.ID%>" src="../../content/img/minus.gif"
            style="border-width: 0px;" onclick="javascript:hideSiteNode(<%: item.ID%>); return false;" />
    </span><span style="background: url('../../content/img/folder.png') no-repeat left top;
        display: block; padding: 3px 0 3px 25px; margin-bottom: 2px;">&nbsp; </span><span
            class="title">
            <%: item.Description%>
        </span>
        <br />
        <div id="nodeSite_<%: item.ID%>">
        <ul>
            <% For Each locationItem In item.Childs%>
            <li id="slLocRow_<%: locationItem.ID%>"><span>
                <input type="image" id="btnDepartmentNode_<%: locationItem.ID%>" src="../../content/img/minus.gif"
                    style="border-width: 0px;" onclick="javascript:hideDepartmentNode(<%: locationItem.ID%>); return false;" />
            </span><span style="background: url('../../content/img/doc.png') no-repeat left top;
                display: block; padding: 3px 0 3px 25px; margin-bottom: 2px;">&nbsp; </span><span
                    class="title" onclick="selectDepartment(<%: locationItem.ID%>);">
                    <%: locationItem.Description%>
                </span>
                <br />
                <div id="nodeDepartment_<%: locationItem.ID%>">
                    <% For Each groupItem In locationItem.Groups%>
                    <div id="groupNode_<%: groupItem.ID %>" class="node" onclick="selectGroup(<%: groupItem.ID %>, <%: locationItem.ID%>,'<%: groupItem.Description%>');">
                        <span style="background: url('../../content/img/group.png') no-repeat left; display: block;
                            padding: 3px 0 3px 15px; margin-bottom: 2px;" onclick="alert('s');">&nbsp; </span><span class="title">
                                <%: groupItem.Description%></span>
                    </div>
                    <br />
                    <% Next%>
                </div>
            </li>
            <% Next%>
        </ul>
        </div>
    </li>
    <% Next%>
</ul>
